CREATE EXTERNAL TABLE `jms_dm`.`dm_customer_volume_flow_direction_city_dt`(
`start_time`               date          COMMENT '日期',
`manage_region_code`       string        COMMENT '寄件管理大区code',
`manage_region_name`       string        COMMENT '寄件管理大区name',
`subordinate_agent_code`   string        COMMENT '寄件代理区code',
`subordinate_agent_name`   string        COMMENT '寄件代理区名称',
`first_franchisee_code`    string        COMMENT '寄件加盟商名称code',
`first_franchisee_name`    string        COMMENT '寄件加盟商名称name',
`pick_network_code`        string        COMMENT '寄件网点名称code',
`pick_network_name`        string        COMMENT '寄件网点名称name',
`customer_code`            string        COMMENT '寄件客户编码',
`customer_name`            string        COMMENT '寄件客户名称',
`send_provider_id`         string        COMMENT '寄件省份id',
`send_provider_desc`       string        COMMENT '寄件省份name',
`send_city_id`             string        COMMENT '寄件城市id',
`send_city_desc`           string        COMMENT '寄件城市name',
`receiver_provider_id`     string        COMMENT '目的省份id',
`receiver_provider_desc`   string        COMMENT '目的省份name',
`receiver_city_id`         string        COMMENT '目的城市id',
`receiver_city_desc`       string        COMMENT '目的城市name',
`total_weight`             bigint        COMMENT '重量',
`waybill_no_count`         bigint        COMMENT '件量',
`one_waybill_count`        bigint        COMMENT '0-0.1KG',
`one_waybill_persent`      decimal(11,2) COMMENT '0-0.1KG',
`two_waybill_count`        bigint        COMMENT '0.1-0.2KG',
`two_waybill_persent`      decimal(11,2) COMMENT '0.1-0.2KG',
`three_waybill_count`      bigint        COMMENT '0.2-0.3KG',
`three_waybill_persent`    decimal(11,2) COMMENT '0.2-0.3KG',
`four_waybill_count`       bigint        COMMENT '0.3-0.4KG',
`four_waybill_persent`     decimal(11,2) COMMENT '0.3-0.4KG',
`five_waybill_count`       bigint        COMMENT '0.4-0.5KG',
`five_waybill_persent`     decimal(11,2) COMMENT '0.4-0.5KG',
`six_waybill_count`        bigint        COMMENT '0.5-0.7KG',
`six_waybill_persent`      decimal(11,2) COMMENT '0.5-0.7KG',
`seven_waybill_count`      bigint        COMMENT '0.7-1.0KG',
`seven_waybill_persent`    decimal(11,2) COMMENT '0.7-1.0KG',
`eight_waybill_count`      bigint        COMMENT '1.0-1.5KG',
`eight_waybill_persent`    decimal(11,2) COMMENT '1.0-1.5KG',
`nine_waybill_count`       bigint        COMMENT '1.5-2.0KG',
`nine_waybill_persent`     decimal(11,2) COMMENT '1.5-2.0KG',
`ten_waybill_count`        bigint        COMMENT '2.0-3.0KG',
`ten_waybill_persent`      decimal(11,2) COMMENT '2.0-3.0KG',
`eleven_waybill_count`     bigint        COMMENT '3.0-5.0KG',
`eleven_waybill_persent`   decimal(11,2) COMMENT '3.0-5.0KG',
`twelve_waybill_count`     bigint        COMMENT '5.0-10.0KG',
`twelve_waybill_persent`   decimal(11,2) COMMENT '5.0-10.0KG',
`thirteen_waybill_count`   bigint        COMMENT '0.0-20.0KG',
`thirteen_waybill_persent` decimal(11,2) COMMENT '0.0-20.0KG',
`fourteen_waybill_count`   bigint        COMMENT '≥20KG',
`fourteen_waybill_persent` decimal(11,2) COMMENT '≥20KG')
COMMENT '客户货物流向表--城市'
PARTITIONED BY (`dt` string COMMENT '更新日期 (yyyy-MM-dd)')
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
WITH SERDEPROPERTIES (
  'serialization.format' = '1'
)
STORED AS
  INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION 'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_customer_volume_flow_direction_city_dt'
TBLPROPERTIES (
  'bucketing_version' = '2',
  'transient_lastDdlTime' = '1644910968',
  'parquet.column.index.access' = 'true',
  'discover.partitions' = 'false'
)


CREATE EXTERNAL TABLE `jms_dm`.`dm_customer_volume_flow_direction_province_dt`(
`start_time`               date          COMMENT '日期',
`manage_region_code`       string        COMMENT '寄件管理大区code',
`manage_region_name`       string        COMMENT '寄件管理大区name',
`subordinate_agent_code`   string        COMMENT '寄件代理区code',
`subordinate_agent_name`   string        COMMENT '寄件代理区名称',
`first_franchisee_code`    string        COMMENT '寄件加盟商名称code',
`first_franchisee_name`    string        COMMENT '寄件加盟商名称name',
`pick_network_code`        string        COMMENT '寄件网点名称code',
`pick_network_name`        string        COMMENT '寄件网点名称name',
`customer_code`            string        COMMENT '寄件客户编码',
`customer_name`            string        COMMENT '寄件客户名称',
`send_provider_id`         string        COMMENT '寄件省份id',
`send_provider_desc`       string        COMMENT '寄件省份name',
`send_city_id`             string        COMMENT '寄件城市id',
`send_city_desc`           string        COMMENT '寄件城市name',
`receiver_provider_id`     string        COMMENT '目的省份id',
`receiver_provider_desc`   string        COMMENT '目的省份name',
`receiver_city_id`         string        COMMENT '目的城市id',
`receiver_city_desc`       string        COMMENT '目的城市name',
`total_weight`             bigint        COMMENT '重量',
`waybill_no_count`         bigint        COMMENT '件量',
`one_waybill_count`        bigint        COMMENT '0-0.1KG',
`one_waybill_persent`      decimal(11,2) COMMENT '0-0.1KG',
`two_waybill_count`        bigint        COMMENT '0.1-0.2KG',
`two_waybill_persent`      decimal(11,2) COMMENT '0.1-0.2KG',
`three_waybill_count`      bigint        COMMENT '0.2-0.3KG',
`three_waybill_persent`    decimal(11,2) COMMENT '0.2-0.3KG',
`four_waybill_count`       bigint        COMMENT '0.3-0.4KG',
`four_waybill_persent`     decimal(11,2) COMMENT '0.3-0.4KG',
`five_waybill_count`       bigint        COMMENT '0.4-0.5KG',
`five_waybill_persent`     decimal(11,2) COMMENT '0.4-0.5KG',
`six_waybill_count`        bigint        COMMENT '0.5-0.7KG',
`six_waybill_persent`      decimal(11,2) COMMENT '0.5-0.7KG',
`seven_waybill_count`      bigint        COMMENT '0.7-1.0KG',
`seven_waybill_persent`    decimal(11,2) COMMENT '0.7-1.0KG',
`eight_waybill_count`      bigint        COMMENT '1.0-1.5KG',
`eight_waybill_persent`    decimal(11,2) COMMENT '1.0-1.5KG',
`nine_waybill_count`       bigint        COMMENT '1.5-2.0KG',
`nine_waybill_persent`     decimal(11,2) COMMENT '1.5-2.0KG',
`ten_waybill_count`        bigint        COMMENT '2.0-3.0KG',
`ten_waybill_persent`      decimal(11,2) COMMENT '2.0-3.0KG',
`eleven_waybill_count`     bigint        COMMENT '3.0-5.0KG',
`eleven_waybill_persent`   decimal(11,2) COMMENT '3.0-5.0KG',
`twelve_waybill_count`     bigint        COMMENT '5.0-10.0KG',
`twelve_waybill_persent`   decimal(11,2) COMMENT '5.0-10.0KG',
`thirteen_waybill_count`   bigint        COMMENT '0.0-20.0KG',
`thirteen_waybill_persent` decimal(11,2) COMMENT '0.0-20.0KG',
`fourteen_waybill_count`   bigint        COMMENT '≥20KG',
`fourteen_waybill_persent` decimal(11,2) COMMENT '≥20KG')
COMMENT '客户货物流向表--省份'
PARTITIONED BY (`dt` string COMMENT '更新日期 (yyyy-MM-dd)')
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
WITH SERDEPROPERTIES (
  'serialization.format' = '1'
)
STORED AS
  INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION 'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_customer_volume_flow_direction_province_dt'
TBLPROPERTIES (
  'bucketing_version' = '2',
  'transient_lastDdlTime' = '1644910968',
  'parquet.column.index.access' = 'true',
  'discover.partitions' = 'false'
)

